package domain;
// Generated 26-ago-2009 13:40:35 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Salary generated by hbm2java
 */
@Entity
@Table(name="salary"
    ,catalog="domeco"
)
public class Salary  implements java.io.Serializable {


     private Integer idSalary;
     private Wcontract wcontract;
     private Bankaccount bankaccount;
     private String concept;
     private Date dateIncome;
     private double amount;
     private Integer enumeration;

    public Salary() {
    }

	
    public Salary(Wcontract wcontract, Bankaccount bankaccount, Date dateIncome, double amount) {
        this.wcontract = wcontract;
        this.bankaccount = bankaccount;
        this.dateIncome = dateIncome;
        this.amount = amount;
    }
    public Salary(Wcontract wcontract, Bankaccount bankaccount, String concept, Date dateIncome, double amount, Integer enumeration) {
       this.wcontract = wcontract;
       this.bankaccount = bankaccount;
       this.concept = concept;
       this.dateIncome = dateIncome;
       this.amount = amount;
       this.enumeration = enumeration;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="idSalary", unique=true, nullable=false)
    public Integer getIdSalary() {
        return this.idSalary;
    }
    
    public void setIdSalary(Integer idSalary) {
        this.idSalary = idSalary;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="wContractFK", nullable=false)
    public Wcontract getWcontract() {
        return this.wcontract;
    }
    
    public void setWcontract(Wcontract wcontract) {
        this.wcontract = wcontract;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="bankFK", nullable=false)
    public Bankaccount getBankaccount() {
        return this.bankaccount;
    }
    
    public void setBankaccount(Bankaccount bankaccount) {
        this.bankaccount = bankaccount;
    }
    
    @Column(name="concept", length=250)
    public String getConcept() {
        return this.concept;
    }
    
    public void setConcept(String concept) {
        this.concept = concept;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="dateIncome", nullable=false, length=10)
    public Date getDateIncome() {
        return this.dateIncome;
    }
    
    public void setDateIncome(Date dateIncome) {
        this.dateIncome = dateIncome;
    }
    
    @Column(name="amount", nullable=false, precision=22, scale=0)
    public double getAmount() {
        return this.amount;
    }
    
    public void setAmount(double amount) {
        this.amount = amount;
    }
    
    @Column(name="enumeration")
    public Integer getEnumeration() {
        return this.enumeration;
    }
    
    public void setEnumeration(Integer enumeration) {
        this.enumeration = enumeration;
    }




}


